﻿using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Kugar.Core.BaseStruct;
using Kugar.Core.Security;

namespace Kugar.ERPFramework.BLLInterface
{
    ///// <summary>
    /////     项目工程的接口
    ///// </summary>
    //[ServiceContract]
    //public interface IProject
    //{
    //    ProjectInfo Info { get; }


    //}


    ///// <summary>
    /////     工程实例的接口
    ///// </summary>
    //[ServiceContract]
    //public interface IProjectInstance
    //{


    //    /// <summary>
    //    ///     返回当前实例的BLL列表
    //    /// </summary>
    //    /// <returns></returns>
    //    [OperationContract]
    //    object[] GetBLLList();

    //    /// <summary>
    //    ///     登录用户,成功则返回用户信息
    //    /// </summary>
    //    /// <param name="userName"></param>
    //    /// <param name="pw"></param>
    //    /// <returns></returns>
    //    [OperationContract]
    //    ResultReturn<UserInfo> Login(string userName, string pw);

    //    /// <summary>
    //    ///     登出当前用户
    //    /// </summary>
    //    /// <returns></returns>
    //    [OperationContract]
    //    ResultReturn Logout();

    //    /// <summary>
    //    ///     返回当前实例的用户名列表
    //    /// </summary>
    //    /// <returns></returns>
    //    [OperationContract]
    //    ResultReturn<string[]> GetUserNameList();

    //    /// <summary>
    //    ///     备份当前实例的数据库
    //    /// </summary>
    //    /// <returns></returns>
    //    [OperationContract]
    //    ResultReturn BackupDatabase();

    //    /// <summary>
    //    ///     返回当前用户的管理器
    //    /// </summary>
    //    IUserManager UserManager { get; }

    //    /// <summary>
    //    ///     获取项目相关的所有权限列表
    //    /// </summary>
    //    /// <returns></returns>
    //    [OperationContract]
    //    ResultReturn GetPermissionList();

        
    //}

    [ServiceContract]
    public interface  IPermissionManager
    {
        ResultReturn<RMS_PermissionItemValue> GetPermissionByUserID(int userID);

        ResultReturn<RMS_UserGroup> GetUserGroupList();

        ResultReturn SetUserPermission(int userID, KeyValuePair<int, int>[] permissionList);

        ResultReturn SetUserGroupPermission(int groupID, KeyValuePair<int, int>[] permissionList);
    }
}
